package org.ruanjj.designprinciple.dependencyinversion;

//这里的高级模块也依赖抽象接口
public class SwitchCorrect {
    private Switchable switchable;

    public void SwitchCorrect(Switchable switchable){
        this.switchable = switchable;
    }

    public void operateOff(){
        switchable.turnOff();
    }

    public void operateOn(){
        switchable.turnOn();
    }
}
